<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>个人中心</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/Public/admin/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/Public/admin/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />

    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/app.css">
    <script src="/Public/admin/assets/js/jquery.min.js"></script>
    <!-- 引用控制层插件样式 -->
    <link rel="stylesheet" href="/Public/tools/php_img_upload/control/css/zyUpload.css" type="text/css">
</head>

<body data-type="index">
    <script src="/Public/admin/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <include file="./Application/Admin/View/Share/header.html"/>
        <include file="./Application/Admin/View/Share/left.html"/>


        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">

            <div class="container-fluid am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                        <div class="page-header-heading"><span class="am-icon-home page-header-heading-icon"></span> 个人中心 <small></small></div>
                        <p class="page-header-description">你可以查看或者修改个人的基本信息</p>
                    </div>
                    <div class="am-u-lg-3 tpl-index-settings-button">
                        <button type="button" class="page-header-button"><span class="am-icon-paint-brush"></span> 设置</button>
                    </div>
                </div>

            </div>

            <div class="row-content am-cf">
                

            <div class="row am-cf">
                          <div class="am-u-sm-12 am-u-md-8">
                          <div class="widget am-cf">
                          <div class="am-tabs am-margin" data-am-tabs>
                                       <ul class="am-tabs-nav am-nav am-nav-tabs">
                                        <li class="am-active"><a href="#tab1">个人名片</a></li>
                                        <li><a href="#tab2">修改个人信息</a></li>
                                        <li><a href="#tab3">修改账号密码</a></li>
                                      </ul>

                                      <div class="am-tabs-bd">
                                                    <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                                                                <div class="am-g am-margin-top">
                                                                            <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF00C5">用户昵称：</div>
                                                                            <div class="am-u-sm-8 am-u-md-10">
                                                                                {$Think.session.ADMINNAME}
                                                                            </div>
                                                                </div>

                                                               <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF00C5">用户邮箱：</div>
                                                                             <div class="am-u-sm-8 am-u-md-10">
                                                                                {$Think.session.ADMINEMAIL}
                                                                            </div>
                                                               </div>
                                                               <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF00C5">个性签名：</div>
                                                                             <div class="am-u-sm-8 am-u-md-10">
                                                                             <eq name="Think.session.ADMINSIGNATURE" value="">
                                                                             这个家伙很懒，什么都没留下
                                                                             <else/>
                                                                             {$Think.session.ADMINSIGNATURE}
                                                                             </eq>
                                                                                
                                                                            </div>
                                                               </div>
                                                    </div>

                                                   <div class="am-tab-panel am-fade" id="tab2">
                                                                <form class="am-form" method="post" enctype="multipart/form-data" action="/Admin/Admincenter/saveInf">
                                                                <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF6D00 ;line-height: 32px">用户昵称</div>
                                                                             <div class="am-u-sm-8 am-u-md-4">
                                                                                <input type="text" class="am-input-sm" name="name" value="{$Think.session.ADMINNAME}">
                                                                             </div>
                                                                             <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                                                                </div>

                                                             
                                                                <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF6D00 ;line-height: 32px">个性签名</div>
                                                                  <div class="am-u-sm-8 am-u-md-4">
                                                                    <input type="text" class="am-input-sm" name="signature" value="{$Think.session.ADMINSIGNATURE}">
                                                                  </div>
                                                                  <div class="am-hide-sm-only am-u-md-6">建议填写，展示个性化的自己</div>
                                                                </div>

                                                                <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF6D00 ;line-height: 32px">头像</div>
                                                                  <div class="am-u-sm-8 am-u-md-4">
                          <ul data-am-widget="gallery" class="am-gallery am-avg-sm-3 am-avg-md-3 am-avg-lg-4 am-gallery-default" data-am-gallery="{ pureview: true }" id="imgshowlist">
                                                    <eq name="Think.session.ADMINIMG" value="">
                                                    <else/>
                                                     <li style="position:relative;" >
                                                       <div class="am-gallery-item">
                                                           <a href="" class="">
                                                             <img src="{$Think.session.ADMINIMG}"  alt="" class="width:300px; height:200px;"/>
                                                             <input type="hidden" name="imgs[]" value="{$v}" />
                                                             <a class="am-close am-close-alt" onclick="delimg(this)" style="position:absolute; top:1px;left:85px; ">&times;</a>
                                                            </a>
                                                        </div>
                                                    </li>
                                                    </eq>
                                
                          </ul>
                          <div class="am-form-group">
                                    <button type="button" class="am-btn am-btn-danger" data-am-modal="{target: '#upload-modal', closeViaDimmer: 0, width: 700, height: 360}">图片上传</button>

                          </div>
                                                                  </div>
                                                                  <div class="am-hide-sm-only am-u-md-6">建议上传头像，展示个性化的自己</div>
                                                                </div>
                                                               
                                                                <div class="am-g am-margin-top">
                                                                             <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #FF6D00 ;line-height: 32px">操作</div>
                                                                             <div class="am-u-sm-8 am-u-md-4">
                                                                                 <button type="submit" class="am-btn am-btn-primary">保存修改</button>
                                                                             </div>
                                                                             <div class="am-hide-sm-only am-u-md-6">点击保存后，个人信息将发生改变</div>
                                                                             
                                                                </div>
                                                              </form>
                                                   </div>

                                                   <div class="am-tab-panel am-fade" id="tab3">
                                                                <form class="am-form" method="post" action="/Admin/Admincenter/savePassword">
                                                                            <div class="am-g am-margin-top-sm">
                                                                                          <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #EB00FF">
                                                                                          旧密码
                                                                                          </div>
                                                                                          <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                                                                          <input type="password" class="am-input-sm" name="oldpwd">
                                                                                          </div>
                                                                            </div>


                                                                             <div class="am-g am-margin-top-sm">
                                                                                          <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #EB00FF">
                                                                                            新密码
                                                                                          </div>
                                                                                          <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                                                                             <input type="password" class="am-input-sm" name="newpwd">
                                                                                          </div>
                                                                            </div>

                                                                            <div class="am-g am-margin-top-sm">
                                                                                          <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #EB00FF">
                                                                                            重复新密码
                                                                                          </div>
                                                                                          <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                                                                             <input type="password" class="am-input-sm" name="renewpwd">
                                                                                          </div>
                                                                            </div>

                                                                            <div class="am-g am-margin-top-sm">
                                                                                          <div class="am-u-sm-4 am-u-md-2 am-text-right" style="color: #EB00FF">
                                                                                            操作
                                                                                          </div>
                                                                                          <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                                                                              <button type="submit" class="am-btn am-btn-primary">保存修改</button>
                                                                                          </div>
                                                                            </div>
                                                                </form>
                                                   </div>

                              </div>
                        </div>
                        </div>
              


                    </div>

                          <div class="am-u-sm-12 am-u-md-4">
                                      <div class="widget am-cf">
                                        
                                      <div class="tpl-user-card am-text-center widget-body-lg">
                                                    <div class="tpl-user-card-title">
                                                        {$Think.session.ADMINNAME}
                                                    </div>
                                                    <div class="achievement-subheading">
                                                        月度最佳员工
                                                    </div>
                                                   <eq name="Think.session.ADMINIMG" value="">
                                                   <img class="achievement-image" src="/Public/admin/assets/img/user07.png" alt="">
                                                    <else/>
                                                   <img class="achievement-image" src="{$Think.session.ADMINIMG}" alt="">
                                                    </eq>
                                                    
                                                    <div class="achievement-description">
                                                        {$Think.session.ADMINNAME}在
                                                        <strong>30天内</strong> 禁言了
                                                        <strong>200多</strong>人。
                                                    </div>
                                       </div>
                                       </div>
                          </div>
            </div>


                <div class="row am-cf">
                  

                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-8 widget-margin-bottom-lg">

                        <div class="widget am-cf widget-body-lg">

                            <div class="widget-body  am-fr">
                                <div class="am-scrollable-horizontal ">
                                    <table width="100%" class="am-table am-table-compact am-text-nowrap tpl-table-black " id="example-r">
                                        <thead>
                                            <tr>
                                                <th>文章标题</th>
                                                <th>作者</th>
                                                <th>时间</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr class="gradeX">
                                                <td>新加坡大数据初创公司 Latize 获 150 万美元风险融资</td>
                                                <td>张鹏飞</td>
                                                <td>2016-09-26</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:;">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr class="even gradeC">
                                                <td>自拍的“政治角色”：观众背对希拉里自拍合影表示“支持”</td>
                                                <td>天纵之人</td>
                                                <td>2016-09-26</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:;">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr class="gradeX">
                                                <td>关于创新管理，我想和你当面聊聊。</td>
                                                <td>王宽师</td>
                                                <td>2016-09-26</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:;">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr class="even gradeC">
                                                <td>究竟是趋势带动投资，还是投资引领趋势？</td>
                                                <td>着迷</td>
                                                <td>2016-09-26</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:;">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr class="even gradeC">
                                                <td>Docker领域再添一员，网易云发布“蜂巢”，加入云计算之争</td>
                                                <td>醉里挑灯看键</td>
                                                <td>2016-09-26</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:;">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>


                                            <!-- more data -->
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>

    <!-- 模态窗口用于上传图片 -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="upload-modal">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">图片上传
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
    <div class="am-modal-bd">
                <div id="demo" class="demo"></div>
                <div id="successinfo">
    </div>
  </div>
</div>
<!-- 模态窗口end -->
    <script src="/Public/admin/assets/js/jquery.min.js"></script> 
    <!-- <script src="/Public/admin/assets/js/amazeui.min.js"></script> -->
    <script src="/Public/admin/assets/js/amazeui.datatables.min.js"></script>
    <script src="/Public/admin/assets/js/dataTables.responsive.min.js"></script>
    <script src="/Public/admin/assets/js/echarts.min.js"></script>
   <!--  <script src="/Public/admin/assets/js/app.js"></script> -->
    <script src="/Public/assets/js/amazeui.min.js"></script>

    <script src="/Public/assets/js/app.js"></script>
    <!-- 图片上传 -->
    <!-- 引用核心层插件 -->
<script type="text/javascript" src="/Public/tools/php_img_upload/core/zyFile.js"></script>
<!-- 引用控制层插件 -->
<script type="text/javascript" src="/Public/tools/php_img_upload/control/js/zyUpload.js"></script>

<script type="text/javascript" >
    
    $(function(){
    // 初始化插件
    var width = $(window).width();
    if ( width >= 650 )  width = '100%';
    else    width = "100%";

    $("#demo").zyUpload({
        width            :   width,                 // 宽度
        height           :   "auto",                 // 宽度
        itemWidth        :   "140px",                 // 文件项的宽度
        itemHeight       :   "100px",                 // 文件项的高度
        //url              :   "/upload/UploadAction",  // 上传文件的路径
        url              :   "/Admin/Upload/up",
        inputName        :  '_img[]',
        id               :   1,
        multiple         :   true,                    // 是否可以多个文件上传
        dragDrop         :   false,                    // 是否可以拖动上传文件
        del              :   true,                    // 是否可以删除文件
        finishDel        :   false,                   // 是否在上传文件完成后删除预览
        /* 外部获得的回调接口 */
        onSelect: function(selectFiles, allFiles){    // 选择文件的回调方法  selectFile:当前选中的文件  allFiles:还没上传的全部文件
            console.info("当前选择了以下文件：");
            console.info(selectFiles);
        },
        onProgress: function(file, loaded, total){    // 正在上传的进度的回调方法
            var eleProgress = $("#uploadProgress_" + file.index), percent = (loaded / total * 100).toFixed(2) + '%';
            eleProgress.html(percent);
            console.info(file.index);
            console.info("当前正在上传此文件：");
            console.info(file.name);
            console.info("进度等信息如下：");
            console.info(loaded);
            console.info(total);
        },   
        onDelete: function(file, files){              // 删除一个文件的回调方法 file:当前删除的文件  files:删除之后的文件
            console.info("当前删除了此文件：");
            console.info(file.name);
        },
        onSuccess: function(file, response){          // 文件上传成功的回调方法
            console.info("此文件上传成功：");
            $('#successinfo').append("<p>"+response+"</p>");
            console.info(response);
            var html= '<li style="position:relative">'
                           +'<div class="am-gallery-item">'
                               +'<a href="" class="">'
                                 +'<img src="'+response+'"  alt="" class="width:300px; height:200px;"/>'
                                 +'<input type="hidden" name="imgs[]" value="'+response+'" />'
                                 +'<a class="am-close am-close-alt" onclick="delimg(this)" style="position:absolute; top:5px;left:82px; ">&times;</a>'
                                +'</a>'
                            +'</div>'
                          +'</li>' ;
            $('#imgshowlist').append(html);
            $('#upload-modal').modal('close');
            // alert(response);

        },
        onFailure: function(file, response){          // 文件上传失败的回调方法
            $("#uploadImage_" + file.index).css("opacity", 0.2);
            console.info("此文件上传失败：");
            console.info(file.name);
        },
        onComplete: function(response){               // 上传完成的回调方法
            console.info("文件上传完成");
            console.info(response);
        }
    });
    
});

</script>
<script>
            function delimg(obj){
                    $(obj).parents('li').remove();
            }

</script>

</body>

</html>